<template>
  <div class="wrapper" v-if="dialogVisible">
    <Driver
      v-if="type === 'driver'"
      :dialogVisible="dialogVisible"
      v-on="$listeners"
    ></Driver>
    <Carrier
      v-if="type === 'carrier'"
      :dialogVisible="dialogVisible"
      v-on="$listeners"
      :diaremarklist ="diaremarklist"
    ></Carrier>
    <Car
      v-if="type === 'car'"
      :dialogVisible="dialogVisible"
      v-on="$listeners"
    ></Car>
    <Thermometer
      v-if="type === 'thermometer'"
      :dialogVisible="dialogVisible"
      v-on="$listeners"
    ></Thermometer>
  </div>
</template>

<script>
/**
 * 资料快捷入口添加
 */
import Driver from "./material/driver.vue";
import Carrier from "./material/carrier.vue";
import Car from "./material/car.vue";
import Thermometer from "./material/thermometer.vue";
export default {
  name: "materialAdd",
  components: { Driver, Carrier, Car, Thermometer },
  props: ["dialogVisible", "type","diaremark"],
  data() {
    return {
      diaremarklist:""
    };
  },
  mounted() {
    console.log(this.diaremark,"this.diaremarkthis.diaremark")
    if(this.diaremark != "" ) {
      // diaremark 1 揽收 2 干线 3 配送 4 回单 5 回箱
      this.diaremarklist = this.diaremark
    }else {
      this.diaremarklist = ""
    }
  },
  methods: {},
};
</script>
<style lang="scss" scoped>
.wrapper {
}
</style>